<template>
  <div style="">
    <el-form ref="itemFrom" :model="itemFrom" label-width="100px" class="formDiv" size="small">
      <el-form-item label="题目" :rules="{
      required: true, message: '昵称不能为空', trigger: 'blur'
    }">
        <el-input type="textarea" v-model="itemFrom.item"></el-input>
      </el-form-item>
      <el-form-item label="解析">
        <el-input type="textarea" v-model="itemFrom.analysis"></el-input>
      </el-form-item>
      <el-form-item label="选项1">
        <el-input v-model="itemFrom.option1"></el-input>
      </el-form-item>
      <el-form-item label="选项2">
        <el-input v-model="itemFrom.option2"></el-input>
      </el-form-item>
      <el-form-item label="选项3">
        <el-input v-model="itemFrom.option3"></el-input>
      </el-form-item>
      <el-form-item label="选项4">
        <el-input v-model="itemFrom.option4"></el-input>
      </el-form-item>
      <el-form-item label="正确选项">
        <el-radio-group v-model="itemFrom.isRight">
          <el-radio label="1">1</el-radio>
          <el-radio label="2">2</el-radio>
          <el-radio label="3">3</el-radio>
          <el-radio label="4">4</el-radio>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="类型">
        <el-select v-model="itemFrom.type" placeholder="请选择试题类型">
          <el-option label="java基础" value="1"></el-option>
          <el-option label="数据库" value="2"></el-option>
          <el-option label="网页设计" value="3"></el-option>
          <el-option label="Python" value="4"></el-option>
        </el-select>
        <el-checkbox-group v-model="itemFrom.type">

        </el-checkbox-group>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="poblicItem()">发布</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
  export default {
    data() {
      return {
        itemFrom: {
          item: '',
          type: '',
          option1: '',
          option2: '',
          option3: '',
          option4: '',
          analysis: '',
          isRight: ''
        },
      }
    }
  }
</script>
